package com.baseframe.create;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;

import com.baseframe.create.activity.ListActivity;
import com.baseframe.create.activity.SharePreferenceActivity;
import com.baseframe.create.activity.SplashActivity;
import com.baseframe.create.activity.TestInterfaceGetActivity;
import com.baseframe.create.activity.TestInterfacePostActivity;
import com.baseframe.create.activity.WebViewActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/10/13.
 */

public class MainActivity extends Activity {
    @BindView(R.id.btn_test)
    Button btnTest;
    @BindView(R.id.btnm)
    Button btnm;
    @BindView(R.id.btn_banner)
    Button btnBanner;
    @BindView(R.id.btn_fragment)
    Button btnFragment;
    @BindView(R.id.btn_switchfragment)
    Button btn_switchfragment;
    @BindView(R.id.btn_sharepreference)
    Button btn_sharepreference;
    @BindView(R.id.btn_welcome)
    Button btn_welcome;
    @BindView(R.id.btn_dimens)
    Button btn_dimens;

    //隐藏fragment
    @BindView(R.id.btn_hidefragment)
    Button btn_hidefragment;
    @BindView(R.id.btn_x5)
    Button btn_x5;
    @BindView(R.id.btn_jump)
    Button btn_jump;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.btn_test, R.id.btnm, R.id.btn_banner, R.id.btn_fragment, R.id.btn_switchfragment, R.id.btn_sharepreference, R.id.btn_welcome, R.id.btn_dimens, R.id.btn_hidefragment, R.id.btn_x5,R.id.btn_jump})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_test:
                startActivity(new Intent(MainActivity.this, TestInterfaceGetActivity.class));
                break;
            case R.id.btnm:
                startActivity(new Intent(MainActivity.this, TestInterfacePostActivity.class));
                break;
            case R.id.btn_banner:
                startActivity(new Intent(MainActivity.this, BannerActivity.class));
                break;
            case R.id.btn_fragment:
                startActivity(new Intent(MainActivity.this, BannerActivity.class));
                break;
            case R.id.btn_switchfragment:
                startActivity(new Intent(MainActivity.this, SwitchFragmentRadioButtonActivity.class));
                break;
            case R.id.btn_sharepreference:
                startActivity(new Intent(MainActivity.this, SharePreferenceActivity.class));
                break;
            case R.id.btn_welcome:
                startActivity(new Intent(MainActivity.this, SplashActivity.class));
                break;
            case R.id.btn_dimens:
                startActivity(new Intent(MainActivity.this, DimensActivity.class));
                break;
            case R.id.btn_hidefragment:
                //hide  fragment
                startActivity(new Intent(MainActivity.this, HideFragmentActivity.class));
                break;

            case R.id.btn_x5:

                break;

            case R.id.btn_jump:
                startActivity(new Intent(MainActivity.this, ListActivity.class));
                break;
        }
    }
}
